package cn.kgc.spring08.entity;

import cn.kgc.spring08.annotation.LogAnnotation;
import org.springframework.stereotype.Component;

/**
 * @author: mosin
 * @version: v1.0  2022/12/6
 */
@Component
public class Calculator {


    public  Integer div(Integer a,Integer b){
        System.out.println("div方法正在执行.....");
        return a/b;
    }


    //@LogAnnotation
    public  double add(Integer a,double b){
        System.out.println("add方法正在执行.....");
        return a+b;
    }


    public Integer sub(Integer a,Integer b ,Integer c){
        System.out.println("sub方法正在执行.....");
        int number = 1/0;
        return a-b-c;
    }
}
